import request from '@/utils/request';

// 查询模型字段详细
export function queryById(id) {
  return request({
    url: '/lcdp/modelColumn/queryById/' + id,
    method: 'get',
  });
}

// 分页查询模型字段列表
export function pageList(query) {
  return request({
    url: '/lcdp/modelColumn/pageList',
    method: 'get',
    params: query,
  });
}

// 分页查询逻辑删除的模型字段列表
export function pageRecycle(params) {
  return request({
    url: '/lcdp/modelColumn/pageRecycle',
    method: 'get',
    params,
  });
}

// 分页查询已发布的模型字段列表
export function pageRelease(params) {
  return request({
    url: '/lcdp/modelColumn/pageRelease',
    method: 'get',
    params,
  });
}

// 查询模型字段列表
export function queryList(query) {
  return request({
    url: '/lcdp/modelColumn/queryList',
    method: 'get',
    params: query,
  });
}

// 分页查询逻辑删除的模型字段列表
export function queryRecycle(params) {
  return request({
    url: '/lcdp/modelColumn/queryRecycle',
    method: 'get',
    params,
  });
}

// 查询已发布的模型字段列表
export function queryRelease(params) {
  return request({
    url: '/lcdp/modelColumn/queryRelease',
    method: 'get',
    params,
  });
}

// 新增模型字段
export function insert(data) {
  return request({
    url: '/lcdp/modelColumn/insert',
    method: 'post',
    data: data,
  });
}

// 修改模型字段
export function updateById(data) {
  return request({
    url: '/lcdp/modelColumn/updateById',
    method: 'put',
    data: data,
  });
}

// 根据id批量审核
export function auditByIds(ids) {
  return request({
    url: '/lcdp/modelColumn/auditByIds/' + ids,
    method: 'put',
  });
}

// 根据id批量反审核
export function unauditByIds(ids) {
  return request({
    url: '/lcdp/modelColumn/unauditByIds/' + ids,
    method: 'put',
  });
}
// 导出当前查询列表
export function exports(params) {
  return request({
    url: '/lcdp/modelColumn/export',
    method: 'post',
    params,
  });
}

// 删除模型字段
export function deleteByIds(ids) {
  return request({
    url: '/lcdp/modelColumn/deleteByIds/' + ids,
    method: 'delete',
  });
}

// 根据id批量还原删除的模型字段
export function recoverByIds(ids) {
  return request({
    url: '/lcdp/modelColumn/recoverByIds/' + ids,
    method: 'put',
  });
}
// 根据id批量逻辑删除模型字段
export function removeByIds(ids) {
  return request({
    url: '/lcdp/modelColumn/removeByIds/' + ids,
    method: 'delete',
  });
}
